//
//  ClothSupply.m
//  Store041
//
//  Created by 041 on 14-7-10.
//  Copyright (c) 2014年 041. All rights reserved.
//

#import "ClothSupply.h"

@implementation ClothSupply

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
//        self.layer.borderWidth = 1;
//        self.layer.borderColor = LineColor.CGColor;
//        
       _buttonView = [UIButton buttonWithType:UIButtonTypeCustom];
        _buttonView.frame = CGRectMake(0, 0, self.width, self.height*4.2/5);
        [_buttonView setBackgroundImage:[UIImage imageNamed:@"home.png"] forState:UIControlStateNormal];
//        [self.buttonView setImage:[UIImage imageNamed:@"home.png"] forState:UIControlStateNormal];
        [self addSubview:_buttonView];
        
        
        
        
        
        
        UIView *label_backgound = [[UIView alloc]initWithFrame:CGRectMake(0, self.buttonView.bottom, self.width, self.height-self.buttonView.height)];
        [label_backgound setBackgroundColor:[UIColor whiteColor]];
        [self addSubview:label_backgound];
        
        
        
        self.label_name = [[UILabel alloc]initWithFrame:CGRectMake(0, 5 , self.width, label_backgound.height/2)];
        self.label_name.textColor = [UIColor blackColor];
        self.label_name.textAlignment = NSTextAlignmentCenter;
        self.label_name.font = [UIFont systemFontOfSize:14];
        [label_backgound addSubview:self.label_name];
        
        
        
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
